package com.youkeyi.ddy.cloud.common.api.application.system.doc;

import com.youkeyi.ddy.cloud.common.api.application.system.doc.dto.SystemDocTypeListCloudDto;
import com.youkeyi.ddy.cloud.common.api.application.system.doc.param.SystemDocTypeCreateCloudParam;
import com.youkeyi.ddy.cloud.common.api.application.system.doc.param.SystemDocTypeDeleteCloudParam;
import com.youkeyi.ddy.cloud.common.api.application.system.doc.param.SystemDocTypeListCloudParam;
import com.youkeyi.ddy.cloud.common.api.application.system.doc.param.SystemDocTypeUpdateCloudParam;
import com.youkeyi.ddy.cloud.common.response.ResponseContent;
import io.swagger.annotations.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * 系统附件类型
 *
 * @DocTypeor liuxiawang
 * @Date 5/24/22 10:36 PM
 * @Location shenzhen.china
 */
@Api(tags = {"【SYSTEM】doc management"})
@RestController
@FeignClient(value = "YOUKEYI-DDY-CLOUD-APPLICATION-SYSTEM", fallback = SystemDocTypeCloudServiceFallback.class)
@RequestMapping("/system/doc/type")
public interface SystemDocTypeCloudService {

    // 查询附件类型列表
    @ApiOperation(value = "Query System DocType List", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.system.doc.SystemDocTypeCloudService.list")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = SystemDocTypeListCloudDto.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "query", value = "Param of Query System DocType List", dataType = "SystemDocTypeListCloudParam", dataTypeClass = SystemDocTypeListCloudParam.class),
    })
    @GetMapping
    public abstract SystemDocTypeListCloudDto list(SystemDocTypeListCloudParam param);

    // 创建附件类型
    @ApiOperation(value = "Create System DocType", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.system.doc.SystemDocTypeCloudService.create")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = ResponseContent.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "body", value = "Param of Create System DocType", dataType = "SystemDocTypeCreateCloudParam", dataTypeClass = SystemDocTypeCreateCloudParam.class),
    })
    @PostMapping("/create")
    public abstract ResponseContent create(@RequestBody SystemDocTypeCreateCloudParam param);


    // 编辑附件类型
    @ApiOperation(value = "Update System DocType", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.system.doc.SystemDocTypeCloudService.update")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = ResponseContent.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "body", value = "Param of Update System DocType", dataType = "SystemDocTypeUpdateCloudParam", dataTypeClass = SystemDocTypeUpdateCloudParam.class),
    })
    @PatchMapping("update")
    public abstract ResponseContent update(@RequestBody SystemDocTypeUpdateCloudParam param);


    // 删除附件类型
    @ApiOperation(value = "Delete System DocType", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.system.doc.SystemDocTypeCloudService.delete")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = ResponseContent.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "query", value = "Param of Delete System DocType", dataType = "SystemDocTypeDeleteCloudParam", dataTypeClass = SystemDocTypeDeleteCloudParam.class),
    })
    @DeleteMapping("/delete")
    public abstract ResponseContent delete(SystemDocTypeDeleteCloudParam param);

}
